import { getCityAll } from '@/service'
import {defineStore} from 'pinia'

const useCityStore = defineStore('cityState',{
  state:()=>({
    allCities:{},
    currentCity:{
      cityName:'上海'
    },
  }),
  actions:{
    async fetchAllCitiesData(){
      const res = await getCityAll()
      this.allCities = res.data
      console.log("打印请求数据",res.data);
    }
  }
})
export default useCityStore